//
//  OosOfferQuery.m
//  oos4ios
//
//  Created by Pablo Gonzalez on 9/20/11.
//  Copyright 2011 11870.com. All rights reserved.
//

#import "OosOfferQuery.h"
#import <oos4ios/ApiUrlProvider.h>

@implementation OosOfferQuery

+ (OosOfferQuery *)queryFromUserSlug:(NSString *)slug 
{
    NSString *urlString = [[ApiUrlProvider provider].userOffers getUrl:slug, nil];
    NSURL *url = [NSURL URLWithString:urlString];
    return [OosOfferQuery queryWithFeedURL:url];
}

+ (OosOfferQuery *)queryFromServiceSlug:(NSString *)slug
{
    NSString *urlString = [[ApiUrlProvider provider].siteOffers getUrl:slug, nil];
    NSURL *url = [NSURL URLWithString:urlString];
    return [OosOfferQuery queryWithFeedURL:url];
}

+ (OosOfferQuery *)queryFromOfferId:(NSString *)offerId
{
    NSString *urlString = [[ApiUrlProvider provider].offers getUrl:offerId, nil];
    NSURL *url = [NSURL URLWithString:urlString];
    return [OosOfferQuery queryWithFeedURL:url];
}

@end